Package-level declarations

Functions

Link copied to clipboard
inline fun bind(pos: Int, range: IntRange, message: () -> String)

Inherited functions

Link copied to clipboard
operator fun <T : Comparable<T>> ClosedRange<T>.contains(other: ClosedRange<T>): Boolean

Checks if both endpoints of the other range are inside of this one.

Link copied to clipboard
infix fun IntRange.cross(other: IntRange): IntRange

Creates an intersection between this and the other range, returning IntRange.EMPTY if there's no overlap.

infix fun LongRange.cross(other: LongRange): LongRange

Creates an intersection between this and the other range, returning LongRange.EMPTY if there's no overlap.

Link copied to clipboard
infix fun Int.extend(length: Int): IntRange
infix fun Long.extend(length: Long): LongRange

Creates a range starting at this, spanning the provided length. The result is unchecked.

infix fun IntRange.extend(other: IntRange): IntRange
infix fun LongRange.extend(other: LongRange): LongRange

Creates a union of this and the other range, covering all values between them.

Link copied to clipboard
infix fun IntRange.merge(other: IntRange): IntRange

Creates a union of this and the other range if they overlap, otherwise returns IntRange.EMPTY.

infix fun LongRange.merge(other: LongRange): LongRange

Creates a union of this and the other range if they overlap, otherwise returns LongRange.EMPTY.

Link copied to clipboard
infix fun <T : Comparable<T>> ClosedRange<T>.overlaps(other: ClosedRange<T>): Boolean

Checks if this and the other range have an overlapping segment.

Link copied to clipboard
infix fun IntRange.shl(n: Int): IntRange
infix fun LongRange.shl(n: Long): LongRange

Shifts this range n steps to the left. The result is unchecked.

Link copied to clipboard
infix fun IntRange.shr(n: Int): IntRange
infix fun LongRange.shr(n: Long): LongRange

Shifts this range n steps to the right. The result is unchecked.